package com.elock.entity;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import com.elock.base.core.entity.BaseEntity;

/**
 * Entity - 锁机构关联
 * @author 仁德
 */
@Entity
@Table(name = "elock_sale_org")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "elock_sale_org_sequence")
public class ElockSaleOrg extends BaseEntity {

	private static final long serialVersionUID = 1386745660360951034L;

	/** 锁 */
	private Elock elock;

	/** 机构 */
	private SaleOrg saleOrg;

	@ManyToOne(fetch = FetchType.LAZY)
	public Elock getElock() {
		return elock;
	}

	public void setElock(Elock elock) {
		this.elock = elock;
	}

	/**  
	 * 获取saleOrg  
	 * @return saleOrg saleOrg  
	 */
	@ManyToOne(fetch = FetchType.LAZY)
	public SaleOrg getSaleOrg() {
		return saleOrg;
	}

	/**  
	 * 设置saleOrg  
	 * @param saleOrg saleOrg  
	 */
	public void setSaleOrg(SaleOrg saleOrg) {
		this.saleOrg = saleOrg;
	}

}
